﻿using Cofe.Core.Property;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Cofe.Core.Interfaces
{
    /// <summary>
    /// Define how to parse a path from CofeSystem, cache (Database) operations is not handled here.
    /// </summary>
    public interface IPathParser : ICofeService
    {
        ParsableType SupportedParseType { get; }
        IVolumeRegistrar VolumeRegistrar { get; set; }
        IEntryConstructor EntryConstructor { get; set; }        

        Task<IPropertyHost> TryParsePathAsync(string fullParsePath, ParsableType type,
            EntryConstructionFlags flags = EntryConstructionFlags.Default);
        IPropertyHost 
            TryParsePath(string fullParsePath, ParsableType type,
            EntryConstructionFlags flags = EntryConstructionFlags.Default);

        Task<bool> ExistsAsync(string fullParsePath, ParsableType type);
    }
}
